package com.javasm.crm.mapper.sell;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.javasm.crm.domin.vo.SellOrderInfoVO;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @Author：liuqizhe
 * @Version：1.0
 * @Date：2021/7/12-22:52
 * @Since:jdk1.8
 * @Description:TODO
 */
@Repository
public interface SellOrderInfoVOMapper extends BaseMapper<SellOrderInfoVO> {

    @Select("select o.sell_code,o.order_type,o.order_action,o.business_type,o.pay_way,o.delivery_way,o.order_create_time,s.order_state" +
            " from sell_order o left join sell_state s on o.sell_code = s.sell_code"+" ${ew.customSqlSegment}")
    List<SellOrderInfoVO> getSellOrderInfoVO(Page<SellOrderInfoVO> page, @Param(Constants.WRAPPER) QueryWrapper<SellOrderInfoVO> queryWrapper);
}
